home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 July & August
/
PCWorld_2006-07-08_cd.bin
/
v cisle
/
acehtml
/
acehtmlfreeware.exe
/
scriptdef
/
Volume Equivalents.sd
< prev
next >
Wrap
INI File
|
2004-06-28
|
7KB
|
231 lines
[SUBJECT]
Description=Converts between different units of volume
ImageIndex=-1
Folder=Mathematics
[BODY_TEXT]
;
;<!-- Cut-N-Paste JavaScript from ISN Toolbox
;Copyright 1996, Infohiway Server Network. Restricted use is hereby
;granted (both personal and commercial use OK so long as this code is
;not *directly* sold), providing this notice is buried somewhere deep
;in your HTML document. A link to http://www.infohiway.com is always
;appreciated, but is absolutely and positively not necessary. :-) -->
;
;<script language="JavaScript">
;
;<!-- Hide JavaScript from Java-Impaired Browsers
;
;function initArray() {
;
; this.length = initArray.arguments.length;
;
; for (var i = 0; i < this.length; i++) {
;
; this[i] = initArray.arguments[i];
;
; }
;
; }
;
;/* Please don't ask about this work-around. It works... We're sure arrays
;
; will be better supported soon. */
;
;var isn05 = new initArray("4b","5b","8b","8b");
;
;isn05[0] = "~01~10.0005787~20.00002143~30.5541~40.01732~50.01488~60.004329~70.000465~80.01639~9";
;
;isn05[1] = "~01728~11~20.03704~3957.5~429.92~525.71~67.481~70.8036~828.32~9";
;
;isn05[2] = "~046656~127~21~325853~4807.9~5694.3~6202.2~721.70~8764.6~9";
;
;isn05[3] = "~01.805~10.001044~20.00003868~31~40.03125~50.02686~60.007812~70.0008392~80.02957~9";
;
;isn05[4] = "~057.75~10.03342~20.001238~332~41~50.8594~60.25~70.02686~80.9464~9";
;
;isn05[5] = "~067.20~10.03889~20.001440~337.24~41.164~51~60.2909~70.03125~81.101~9";
;
;isn05[6] = "~0231~10.1337~20.004951~3128~44~53.437~61~70.1074~83.785~9";
;
;isn05[7] = "~02150~11.244~20.04609~31192~437.24~532~69.309~71~835.24~9";
;
;isn05[8] = "~061.02~10.03531~20.001308~333.81~41.057~50.9081~60.2642~70.02838~81~9";
;
;
;
;
;
;function volCon() {
;
; // First, get the variables checked by the user
;
; for (var i = 0; i < 9; i++) {
;
; if (document.isnform05.voli[i].checked) {
;
; voli = i;
;
; volinm = document.isnform05.voli[i].value;
;
; }
;
; }
;
; for (var i = 0; i < 9; i++) {
;
; if (document.isnform05.volo[i].checked) {
;
; volo = i;
;
; volonm = document.isnform05.volo[i].value;
;
; }
;
; }
;
; // Now grab the numeric input by user and parse to be sure numeric
;
; useri = document.isnform05.volinp.value;
;
; if (useri == 0) {
;
; useri = 1;
;
; document.isnform05.volinp.value = useri;
;
; }
;
; mulstr = isn05[voli];
;
; picker = "~" + volo;
;
; ps = mulstr.indexOf(picker);
;
; volo++;
;
; picker = "~" + volo;
;
; ps1 = mulstr.indexOf(picker);
;
; mulstr = mulstr.substring((ps + 2),ps1);
;
; ps = (useri * mulstr);
;
; picker = "";
;
; picker += ps;
;
; ps1 = picker.indexOf(".");
;
; if (ps1 > -1) {
;
; // Correct for binary/floating point conversion error
;
; ps = ps + .000001;
;
; picker = "";
;
; picker += ps;
;
; ps2 = picker.indexOf("e");
;
; if (ps2 < 0) {
;
; picker = picker.substring(0,(ps1 + 6));
;
; }
;
; if (ps2 == 0 || ps2 > 0) {
;
; ps3 = picker.indexOf("00000");
;
; if (ps3 > 0) {
;
; picker = picker.substring(0,ps3 + 1) + picker.substring(ps2,picker.length);
;
; }
;
; }
;
; }
;
; picker = useri + " " + volinm + " = " + picker + " " + volonm;
;
; document.isnform05.volout.value = picker;
;
; }
;
;// End Hiding -->
;
;
;
;</script>
;<form name="isnform05">
;<table border="1" width="486" summary="">
;
;<tr><td colspan="10" align="center"><font color="blue"><b>`Caption`</b></FONT></TD></tr>
;
;<tr><td colspan="10" valign="top"><font size="1"><b>First, type the number you wish converted here: </b>
;
;<input type="text" name="volinp" size="30" value="" onChange="volCon();"><br><b>Then, click radio buttons for desired conversion:</B></font></td></tr>
;
;<tr><td align="center"><font color="red" size="1"><b>From:</b></font></td>
;
;<td align="center" valign="top"><font size="1">Cubic Inches<br><input type="radio" name="voli" value="Cubic Inches" checked onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">Cubic Feet<br><input type="radio" name="voli" value="Cubic Feet" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">Cubic Yards<br><input type="radio" name="voli" value="Cubic Yards" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">US Fluid Ounces*<br><input type="radio" name="voli" value="Fluid Ounces" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">US Liquid Quarts<br><input type="radio" name="voli" value="US Liquid Quarts" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">US Dry Quarts<br><input type="radio" name="voli" value="US Dry Quarts" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">US Gallons<br><input type="radio" name="voli" value="US Gallons" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">US Bushels<br><input type="radio" name="voli" value="US Bushels" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">Liters<br> <br><input type="radio" name="voli" value="Liters" onClick = ""></FONT></TD></tr>
;
;<tr><td align="center"><font color="red" size="1"><b>To:</b></FONT></TD>
;
;<td align="center" valign="top"><font size="1">Cubic Inches<br><input type="radio" name="volo" value="Cubic Inches" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">Cubic Feet<br><input type="radio" name="volo" value="Cubic Feet" checked onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">Cubic Yards<br><input type="radio" name="volo" value="Cubic Yards" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">US Fluid Ounces*<br><input type="radio" name="volo" value="Fluid Ounces" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">US Liquid Quarts<br><input type="radio" name="volo" value="US Liquid Quarts" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">US Dry Quarts<br><input type="radio" name="volo" value="US Dry Quarts" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">US Gallons<br><input type="radio" name="volo" value="US Gallons" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">US Bushels<br><input type="radio" name="volo" value="US Bushels" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">Liters<br> <br><input type="radio" name="volo" value="Liters" onClick = ""></FONT></TD></tr>
;
;<tr><td colspan="10" align="center" valign="top"><font size="1"><input type="button" value=" Click for Conversion " onClick="volCon();">
;<input type="reset" value=" Reset Values "><br><input type="text" name="volout" size="60" value="" onClick="volCon();"><br>* Apothecary
;
;</FONT></TD></tr>
;
;</table></form>
;
;<p>
;
[`Caption`]
Kind=S
Value=Volume/Capacity Equivalents